#include <stdio.h>

int suan(int num)
{
	int count = 0;
	int i = 0;
	for(i = 0; i < 32; i++)
	{
		if((num >> i)&1)
		{
			count++;
		}
	}
	return count;
}

int main()
{
	int num = 0;
	scanf("%d", &num);
	printf("%d ", suan(num));

	return 0;
}


